package com.ruoyi.safety.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.safety.mapper.SafetySubstationInfoMapper;
import com.ruoyi.safety.domain.SafetySubstationInfo;
import com.ruoyi.safety.service.ISafetySubstationInfoService;

/**
 * 分站基本信息Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-30
 */
@Service
public class SafetySubstationInfoServiceImpl extends ServiceImpl<SafetySubstationInfoMapper, SafetySubstationInfo> implements ISafetySubstationInfoService //修改
{
    @Autowired
    private SafetySubstationInfoMapper safetySubstationInfoMapper;

    /**
     * 查询分站基本信息
     *
     * @param substationCode 分站基本信息主键
     * @return 分站基本信息
     */
    @Override
    public SafetySubstationInfo selectSafetySubstationInfoBySubstationCode(String substationCode)
    {
        return safetySubstationInfoMapper.selectSafetySubstationInfoBySubstationCode(substationCode);
    }

    /**
     * 查询分站基本信息列表
     *
     * @param safetySubstationInfo 分站基本信息
     * @return 分站基本信息
     */
    @Override
    public List<SafetySubstationInfo> selectSafetySubstationInfoList(SafetySubstationInfo safetySubstationInfo)
    {
        return safetySubstationInfoMapper.selectSafetySubstationInfoList(safetySubstationInfo);
    }

    /**
     * 新增分站基本信息
     *
     * @param safetySubstationInfo 分站基本信息
     * @return 结果
     */
    @Override
    public int insertSafetySubstationInfo(SafetySubstationInfo safetySubstationInfo)
    {
        return safetySubstationInfoMapper.insertSafetySubstationInfo(safetySubstationInfo);
    }

    /**
     * 修改分站基本信息
     *
     * @param safetySubstationInfo 分站基本信息
     * @return 结果
     */
    @Override
    public int updateSafetySubstationInfo(SafetySubstationInfo safetySubstationInfo)
    {
        return safetySubstationInfoMapper.updateSafetySubstationInfo(safetySubstationInfo);
    }

    /**
     * 批量删除分站基本信息
     *
     * @param substationCodes 需要删除的分站基本信息主键
     * @return 结果
     */
    @Override
    public int deleteSafetySubstationInfoBySubstationCodes(String[] substationCodes)
    {
        return safetySubstationInfoMapper.deleteSafetySubstationInfoBySubstationCodes(substationCodes);
    }

    /**
     * 删除分站基本信息信息
     *
     * @param substationCode 分站基本信息主键
     * @return 结果
     */
    @Override
    public int deleteSafetySubstationInfoBySubstationCode(String substationCode)
    {
        return safetySubstationInfoMapper.deleteSafetySubstationInfoBySubstationCode(substationCode);
    }
}
